home *** CD-ROM | disk | FTP | other *** search
-
-
-
- Copy(V1.3,2.x,3.x) (in the C: directory))
-
-
-
- NAME
- Copy - Copy files.
-
- SYNOPSIS
- Copy From To ALL QUIET BUF=BUFFER CLONE DATES
- NOPRO COM FLAGS QUICK
-
- DESCRIPTION
- COPY duplicates the contents of the file or files (if
- wildcards or a directory is given) of its FROM argument
- to the file or directory specified in its TO argument,
- overwriting any existing file or files of the same names.
-
- FILE SPECIFICATION
- The From argument may be a file, a directory or a
- wildcard pattern. You can use a dot '.' as either the
- From or To directory to indicate the current directory.
- Double quotes "" can be used to refer to the current
- directory.
-
- If you copy a file, you may give that file the same
- name or a different name as the original. If the
- destination has the same name as the original then the
- new copy will replace it.
-
- Copy can duplicate many copies of a file to the same
- directory if dirrerent names are used. It can also
- duplicate files to many different directories.
-
- If the From argument is a directory or a pattern, the
- To argument is assumed to be a directory or destination
- replacement pattern. If the directory specified in the
- To argument does not exist, it will be created for you.
-
- If you include wildcard characters in the To
- argument, these are taken to be a request to use a
- pattern substitution for the destination filename. The
- expected syntax is:
-
- <optional_prefix>|<optional_postfix>
-
- You may specify neither, one, or both of these
- optional tags. If you exceed the length of an AmigaDOS
- filename (30 characters as of this writing) the name will
- be silently truncated.
-
- You can also indicate which portion of the From
- filename you want to be replaced by using the wildcard
- characters in the source pattern. As an example, the
- command:
-
- Copy l#? TO Ram:
-
- will copy all files beginning with an 'l' to the Ram:
- directory.
-
- In 1.3 you CANNOT use wildcards for Directory names,
- only file names. 2.x/3.x allows this.
-
- 1.3 will not let you copy a file to a directory that
- does not exist. In 2.x/3.x COPY will create a directory
- if one does not exist.
-
- If you copy a file to the same directory it cannot
- have a file with that same name of the protection bit is
- set on the file being copied to.
-
- The from statement is not needed as long as the
- source and target files are in the appropriate order. If
- the orders are changed (Copy To filename FROM filename),
- the FROM is required.
-
- If you don't specify a directory, but the TO keyword
- is used, then the current directory is copied to the
- destination. For instance, COPY TO Work: will copy the
- entire contents of the current directory to Work:.
-
- Devices such as PRT: and SPEAK: can be designated as
- the destination of any file being copied.
-
- 2.x/3.x Only: You can chose multiple FROM files as
- well as multiple TO files.
-
-
- OPTIONS
- ALL
- Copies ALL the files from the source directory to the
- destination directory or device. This will recursively
- descend all subdirectories found in the From directory,
- and create them (if they do not already exist) in the To
- directory. Without this switch, only the first level of
- the directory hierarchy will be duplicated.
-
- QUIET
- Performs a Copy without reporting what it is doing.
- This is useful for doing copies in the background, when
- you do not wish to be disturbed by informative messages.
- Note that errors will still be reported.
-
- BUF=BUFFER
- This allows you to specify the number of 512 byte
- buffers used during the copy. Unlike the Commodore Copy,
- which uses a fixed number of buffers if this option is
- not specified (currently, 200 buffers), the ARP Copy sets
- its internal buffer size intelligently as a function of
- how much memory your system contains and the size of the
- file to be copied. Using this option overrides this
- intelligent behavior.
-
- CLONE
- This instructs Copy to duplicate the date, comments
- and protection bits (except the archive bit) of the
- original file. The default is to Copy only the
- protection bits. (also see Environment, below). This is
- the same as using both the DATE and COM keywords.
-
- DATE
- This option instructs Copy to duplicate the datestamp
- (also see Environment, below).
-
- NOPRO
- By default, Copy duplicates the protection bits of
- the file(s) (except the archive bit). Using this option
- will override this behavior, and cause the file to be
- created with the current system default protection (also
- see Environment, below).
-
- COM
- This forces Copy to duplicate the comment for the
- file. The default is not to duplicate the comment (also
- see Environment, below).
-
- QUICK
- This ARP addition is a highly useful option which
- will duplicate files only if the destination file does
- not exist or is not the same. Copy uses the Datestamp,
- Filesize, Protect bits, and also the Filenote (but only
- if you have enabled copying filenotes) to determine
- whether or not the file is the same. Since a byte by byte
- compare is not done, it is possible to fool Copy.
- However, in normal operation of the Amiga, this
- dramatically speeds up Copies between directories and is
- perfectly safe (also see Environment, below).
-
- FLAGS
-
- You can override the current setting of your
- environment flags using this keyword. Any option
- specified on the command line overrides the default
- settings specified by the copyflags environment variable.
- This keyword takes a string of the same type used for the
- copyflags variable. For a discussion of these flags, see
- Environment, below.
-
- NOREQ
-
- Normally, whenever you try to copy to a directory
- that does not exist a requestor will pop up asking you to
- insert it. If you do not want that little requestor,
- then use this keyword. This is useful for when you want
- to write a script for someone else who does not have a
- device you want to try to copy to (such as a printer or a
- speech device- speech devices were removed from the
- Workbench with 2.0).
-
- ENVIRONMENT
- If you prefer a behavior for copy other than the
- default, you can specify this behavior permanently by
- setting a value for the copyflags environment variable.
- This variable takes a string of characters composed of
- the following:
-
- N Always copy filenotes (see COM, above).
-
- C Always copy original datestamp (see DATES, above).
-
- Q Always copy QUICK (see QUICK, above).
-
- P Never copy protection flags (see NOPRO, above).
-
- O This flag does not correspond to any command line
- arguments. When this flag is set, Copy will only
- duplicate files which already exist in the destination
- directory, it stands for 'OLD', and essentially
- performs an update operation. This is extremely useful
- when trying to update old software with new software.
-
- These flags can be overridden by using a command line
- option, or by using the FLAGS keyword to specify new
- ones. Note also that case is not significant. You can
- set the copyflags variable using Set, SetEnv, or directly
- from the command line if you are using the Shell instead
- of the CLI.
-
- Set copyflags=CQ
- SetEnv copyflags=CQ
-
- The settings shown above is perhaps the most common:
- it enables copying datestamps, protection bits, and the
- QUICK option.
-
- EXAMPLE
- 1. To perform an update from one directory to another
- without using copyflags, use:
-
- Copy NewDir OldDir FLAGS=O
-
-
- 2. To copy a file called TheFile to OtherFile in the
- same dir:
-
- Copy TheFile Otherfile
- or
- Copy TheFile to Otherfile
- or
- Copy To Otherfile From TheFile
-
-
- 3. To copy all the files from Df0: to Work:
-
- Copy Work: df0:
-
-
- 4. To copy all files and subdirectories from df0: to
- Work:
-
- Copy Df0: Work: ALL
-
-
- 5. Copy all the files in the current directory to
- Ram:
-
- Copy "" Ram:
-
-
- 6. To Copy a file called Dudes in the current
- directory to a file with the same name to a directory
- called :WildWest/Cowboys, which is on the same disk:
-
- Copy Dudes :WildWest/Cowboys
-
-
- 7. To Copy selected files from the current directory
- to the Stuff: directory.
-
- Copy "" Stuff:
-
-